package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.TableSettingsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableSettingsMapper;
import com.ruoyi.system.domain.TableSettings;
import com.ruoyi.system.service.ITableSettingsService;

/**
 * 桌台设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class TableSettingsServiceImpl implements ITableSettingsService
{
    @Autowired
    private TableSettingsMapper tableSettingsMapper;

    /**
     * 通过id查询桌台设置
     *
     * @param id 桌台设置主键
     * @return 桌台设置
     */
    @Override
    public TableSettings selectTableSettingsById(Long id)
    {
        return tableSettingsMapper.selectTableSettingsById(id);
    }

    /**
     * 查询桌台设置列表
     *
     * @param tableSettings 桌台设置
     * @return 桌台设置
     */
    @Override
    public List<TableSettings> selectTableSettingsList(TableSettings tableSettings)
    {
        return tableSettingsMapper.selectTableSettingsList(tableSettings);
    }

    /**
     * 新增桌台设置
     *
     * @param tableSettings 桌台设置
     * @return 结果
     */
    @Override
    public int insertTableSettings(TableSettings tableSettings)
    {
        return tableSettingsMapper.insertTableSettings(tableSettings);
    }

    /**
     * 修改桌台设置
     *
     * @param tableSettings 桌台设置
     * @return 结果
     */
    @Override
    public int updateTableSettings(TableSettings tableSettings)
    {
        return tableSettingsMapper.updateTableSettings(tableSettings);
    }

    /**
     * 通过id批量删除桌台设置信息
     *
     * @param ids 需要删除的桌台设置主键
     * @return 结果
     */
    @Override
    public int deleteTableSettingsByIds(Long[] ids)
    {
        return tableSettingsMapper.deleteTableSettingsByIds(ids);
    }

    /**
     * 通过id删除桌台设置信息
     *
     * @param id 桌台设置主键
     * @return 结果
     */
    @Override
    public int deleteTableSettingsById(Long id)
    {
        return tableSettingsMapper.deleteTableSettingsById(id);
    }

    @Override
    public TableSettingsVO selectByStoreId(Long storeId) {
        return tableSettingsMapper.selectByStoreId(storeId);
    }
}
